<script>on mouseupset the scroll of fld "ValidList" to 0-- if there is a fld (value(word 2 of the clickline) + 8) thenif line (value(word 2 of the clickline)) of fld "SRClist" <> "" thenselect line (word 2 of the clickline) to (word 2 of the clickline) of fld "SRClist"lockONput fld (value(word 2 of the clickline) + 8) into field "ValidList"killEmptyLinesboldCommonValueslockOFFselect line (word 2 of the clickline) to (word 2 of the clickline) of fld "SRClist"elsekillEmptyLinesend ifend mouseupon boldCommonValuesif the number of lines in field "common" > 0 thenlockONrepeat with x = 1 to the number of lines in fld "common"-- set cursor to busyrepeat with y = 1 to the number of lines in fld "validList"if value(line x of fld "common" ) = value(line y of fld "validList" ) then set the textstyle of line y of fld "validList" to "bold,condense"end repeatend repeatlockOFFelseanswer "There are no common values available." & return & "You must Re calculate"end ifend boldCommonValues</script>
</part>
<part>
<id>2</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>133</left>
<top>28</top>
<right>219</right>
<bottom>163</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>right</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>12</textHeight>
<name>ValidList</name>
<script></script>
</part>
<part>
<id>3</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>129</left>
<top>219</top>
<right>213</right>
<bottom>340</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>right</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>12</textHeight>
<name>Common</name>
<script></script>
</part>
<part>
<id>4</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>8</left>
<top>1</top>
<right>119</right>
<bottom>28</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>bold</textStyle>
<textHeight>12</textHeight>
<name>L1</name>
<script></script>
</part>
<part>
<id>5</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>124</left>
<top>1</top>
<right>227</right>
<bottom>28</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>bold</textStyle>
<textHeight>12</textHeight>
<name>L2</name>
<script></script>
</part>
<part>
<id>6</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>106</left>
<top>190</top>
<right>218</right>
<bottom>218</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>right</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>shadow</textStyle>
<textStyle>bold</textStyle>
<textHeight>13</textHeight>
<name>L3</name>
<script></script>
</part>
<part>
<id>9</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>11</left>
<top>194</top>
<right>102</right>
<bottom>214</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>bold</textStyle>
<name>Calculate</name>
<script>on mouseUpglobal fromCalcButtonplainTextput true into fromCalcButtonput " " into fld "common"put "" into fld "validList"if the icon of bg btn "edit" = 201 then send mouseup to bg btn "edit"if the number of lines in fld "SRClist"< 1 thenanswer "There are no valid source pict dimensions." & return & "You must enter valid dimensions."exit mouseupend if-- create any needed storage reference fields and all needed dynamic variables for speedier comparingif the number of lines in fld "SRClist" > the number of fields - 8 thenrepeat with listHolder = 1 to the number of lines in fld "SRClist"set the cursor to busylockONif there is no fld (listHolder + 8) then myNewLineStorage,(listHolder + 8)lockOFFend repeatend ifrepeat with listHolder = 1 to the number of lines in fld "SRClist"do "global" && "ValidHolder" & listHolderend repeat-- calculate all the valid tile values for each line in the sourcepict dimension list and fill them into-- the dynamic global variables ValidHolder<x> to create a text block array type of dohickyput false into badValrepeat with linNum = 1 to the number of lines in fld "SRClist"set the cursor to busyput figureData (linNum, line linNum of fld "SRClist") into entryTypeif entryType = -1 thenbeepanswer "Invalid Data in line"&& linNum && "of the source pict dimensions list." & return & return & "Check your dimensions and ensure only two sets of numerals are entered, seperated by spaces."exit mouseupend ifput value(word entryType of line linNum of fld "SRClist") into selDimif selDim > 200000 thenbeepanswer "Maximum vertical dimension is 200,000." & return & return & "Make sure all source pict values are below 200,000 before you calculate."exit mouseupend if-- fix invalid source pict dimensions to the closest value divisible by fourif selDim / 4 <> round(selDim / 4) thenput getCloseDiv4(selDim) into selDimput selDim into word entryType of line linNum of fld "SRClist"set the textstyle of word entryType of line linNum of fld "SRClist" to "bold,condense"end ifput selDim / 4 into selDimQrtrput "" into fld(linNum + 8)do "put" && quote && quote && "into ValidHolder" & (linNum)if selDimQrtr = round(selDim / 4) then -- calculate valid tile valuesput selDimQrtr into selDimrepeat with x = selDim down to 1 -- if valid sourcepict dimension then calc valid tile values and fill array itemset the cursor to busyif selDim / x = (round(selDim / x)) then do "put selDim / x & return after ValidHolder" & (linNum)end repeatrepeat with y = 1 to the number of lines in fld "SRClist" -- dump all array items into matching fieldsset the cursor to busydo "put ValidHolder" & y && "into fld" && (y + 8)end repeatelse -- cancel line entryanswer "The sourcepict dimension at line" && linNum && "is not evenly divisible by 4, alter it and re-calculate"put true into badValexit repeatend ifend repeatif badVal = false then getCommonValsIn the number of lines in fld "SRClist" -- Compare all the valid valuesif value(line 1 of fld "common") <> 1 then -- Bad Databeepanswer "Bad comparison detected, the calculated values seem to be out of range." & return & return & "Check your dimensions and ensure only numerals are entered."end ifset the cursor to arrowend mouseUpon getCommonValsIn sourceContainersglobal nums -- declare dynamic global variables locallyput sourceContainers into numsrepeat with times = 1 to sourceContainersdo "global" && "ValidHolder" & timesend repeatrepeat with currCompareFld = 2 to sourceContainers -- containers to crosscheckdeleteBadValsFromSource 1, currCompareFldend repeatput ValidHolder1 into fld "common"end getCommonValsInon deleteBadValsFromSource currFld, currCompareFldput 1 into currLineglobal nums -- declare dynamic global variables locallyrepeat with timesa = 1 to numsdo "global" && "ValidHolder" & timesaend repeatrepeat with currLineLoop = 1 to (the number of lines in fld currCompareFld + 8) -- lines in current container to crosscheckrepeat while currVal <> emptyput currLine + 1 into currLineset the cursor to busydo "put value(line " & currLine & " of ValidHolder" & currFld & ") into currVal"do "put the number of lines of ValidHolder" & currCompareFld & " into compareFldMaxLines"if currValExistInContainer(currVal, currCompareFld, compareFldMaxLines) = false thendo "delete line " & currLine & " of ValidHolder" & CurrFldput currLine - 1 into currLineend ifend repeatend repeatend deleteBadValsFromSourcefunction currValExistInContainer currVal, currCompareFld, compareFldMaxLinesglobal nums -- declare dynamic global variables locallyrepeat with timesa = 1 to numsdo "global" && "ValidHolder" & timesaend repeatput false into currValExistInContainerrepeat with compareFldCurrLine = 1 to compareFldMaxLinesdo "put value(line " & compareFldCurrLine & " of ValidHolder" & currCompareFld & ") into compareVal"if currVal <> compareVal then put true into thisCompareValIsBadelse put false into thisCompareValIsBadif thisCompareValIsBad = false then put true into currValExistInContainerend repeatreturn currValExistInContainerend currValExistInContainerfunction figureData linNum, figureDataput the number of words of figureData into entryTypeif entryType > 2 then put -1 into entryTypeif entryType <> -1 thenif entryType = 2 thenput value(word 1 of line linNum of fld "SRClist") into numput getCloseDiv4(num) into newNumif newNum <> num thenput newNum into word 1 of line linNum of fld "SRClist"set the textstyle of word 1 of line linNum of fld "SRClist" to "bold,condense"end ifend ifend ifreturn entryTypeend figureDatafunction getCloseDiv4 valif val / 4 <> round(val / 4) then put (round((val + 1) / 4) * 4) into valreturn valend getCloseDiv4</script>
</part>
<part>
<id>10</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>24</left>
<top>226</top>
<right>58</right>
<bottom>260</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <false /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>203</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name></name>
<script>on mousedownset the icon of me to 204repeat while the mouse is downif the mouseloc is within the rect of me then set the icon of me to 204else set the icon of me to 203end repeatset the icon of me to 203if the mouseloc is within the rect of me thenlockONdomenu "New Card"end ifend mousedown</script>
</part>
<part>
<id>11</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>99</left>
<top>20</top>
<right>121</right>
<bottom>38</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>200</icon>
<textAlign>center</textAlign>
<font>Charcoal</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Edit</name>
<script>on mouseUpglobal myDimList, myNewDimList, fromCalcButtonwait 10 ticksif the optionkey is down then plainTextif the icon of me = "200" thenput fld "SRClist" into myDimListset the icon of me to "201"set the locktext of field "SRCList" to falseput fld "SRClist" into myNewDimListelseset the icon of me to "200"set the locktext of field "SRCList" to truefixSpaceskillEmptyLinesput fld "SRClist" into myNewDimListend ifif fromCalcButton = false thenif myDimList <> myNewDimList then answer "The dimension list has been modified." & return & "You must Re-calculate"end ifput false into fromCalcButtonend mouseUp</script>
</part>
<part>
<id>170</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>64</left>
<top>236</top>
<right>85</right>
<bottom>256</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <false /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>20461</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name></name>
<script>on mousedownset the icon of me to "Small left arrowdwn"repeat while the mouse is downif the mouseloc is within the rect of me then set the icon of me to "Small left arrowdwn"else set the icon of me to "Small left arrowup"end repeatset the icon of me to "Small left arrowup"if the mouseloc is within the rect of me thengo previousend ifend mousedown</script>
</part>
<part>
<id>171</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>85</left>
<top>236</top>
<right>108</right>
<bottom>256</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <false /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>22126</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name></name>
<script>on mousedownset the icon of me to "Small right arrowdwn"repeat while the mouse is downif the mouseloc is within the rect of me then set the icon of me to "Small right arrowdwn"else set the icon of me to "Small right arrowup"end repeatset the icon of me to "Small right arrowup"if the mouseloc is within the rect of me thengo nextend ifend mousedown</script>
</part>
<part>
<id>320</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>235</left>
<top>137</top>
<right>497</right>
<bottom>255</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <true /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Times</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>10</textHeight>
<name>HowUse</name>
<script></script>
</part>
<part>
<id>321</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>41</left>
<top>169</top>
<right>219</right>
<bottom>184</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>bold</textStyle>
<textHeight>12</textHeight>
<name>User Set</name>
<script></script>
</part>
<part>
<id>365</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>54</left>
<top>222</top>
<right>114</right>
<bottom>236</bottom>
</rect>
<style>transparent</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <false /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>10</textSize>
<textStyle>plain</textStyle>
<name>1 / 8</name>
<script></script>
</part>
<part>
<id>483</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>9</left>
<top>331</top>
<right>113</right>
<bottom>348</bottom>
</rect>
<style>opaque</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <false /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>bold</textStyle>
<name>Hide Information</name>
<script>on mouseUpif the short name of me is "Show Information" thenset the rect of this card to 0,0,512,352set the name of me to "Hide Information"hide bg btn 10AC_Redrawfixlineelseset the rect of this card to 0,0,224,352set the name of me to "Show Information"show bg btn 10AC_Redrawend ifend mouseUp</script>
</part>
<part>
<id>1318</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>27</left>
<top>166</top>
<right>49</right>
<bottom>188</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <false /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>206</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>FindButton</name>
<script>on mouseUpglobal findstring, lastFindTypeask "Enter the search term you wish to find in the 'User Set' field:" with findstringput the number of this cd into currCardif it is not empty thenput it into findstringput "Set" into lastFindTypefind findstring in fld "user set"if the number of this card = currCard thenset lockscreen to truego nextfind findstring in fld "user set"set lockscreen to falseend ifend ifend mouseUp</script>
</part>
<part>
<id>2459</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>487</left>
<top>116</top>
<right>509</right>
<bottom>138</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <false /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>205</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>FindInstructions</name>
<script>on mouseUpglobal howfindstring, lastFindTypeask "Enter the search term you wish to find in the 'How to use this stack' field:" with howfindstringif it is not empty thenput it into howfindstringput "How" into lastFindTypety howfindstringend ifend mouseUp</script>